home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Sample Code / AppsToGo / DTS.Lib / DTS.Lib.headers / ATUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-24  |  2.9 KB  |  79 lines  |  [TEXT/MPS ]

  1. #ifndef __ATUTILS__
  2. #define __ATUTILS__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __APPLETALK__
  9. #include <AppleTalk.h>
  10. #endif
  11.  
  12. #ifndef __LISTS__
  13. #include <Lists.h>
  14. #endif
  15.  
  16. OSErr            ATInit(void);
  17.     /* Currently does nothing.  Calling it allows the AppleTalk.c.o file to be
  18.     ** needed by the link. */
  19.  
  20. OSErr            DoBuildZoneList(ListHandle listHndl);
  21.     /*
  22.     ** OUTPUT:    listHndl
  23.     ** RESULT:    OSErr
  24.     **
  25.     ** Given a list record, this function places all of the zone names in
  26.     ** the list.  Prior to calling this function, you need to create a
  27.     ** list record that has zero rows and one column.  The zones are added
  28.     ** to the list in the column in alphabetical order.  The function
  29.     ** IUMagString is used to determine order. */
  30.  
  31. OSErr            HiliteUserZone(ListHandle listHndl);
  32.     /*
  33.     ** OUTPUT:    listHndl
  34.     ** RESULT:    OSErr
  35.     **    
  36.     ** Given a list of zones (probably generated by DoBuildZoneList), this
  37.     ** function selects the zone the user is currently in.  The current zone
  38.     ** is selected and scrolled into view. */
  39.  
  40. OSErr            AddPPCNBPAlias(NamesTableEntry *theNTE, Str32 newNBPType, EntityName *newEntity);
  41.     /*
  42.     ** INPUT:    newNBPType    The alias to register for this process
  43.     ** OUTPUT:    theNTE        Receives the resultant NamesTableEntry
  44.     **            newEntity    Receives the resultalt EntityName for use by RemoveNBPAlias
  45.     ** RESULT:    OSErr        If an error is returned, RemoveNBPAlias should not be called.
  46.     **                        Usually, calls to AddPPCNBPAlias and Remove NBPAlias are
  47.     **                        balanced, but this depends on success by ADDPPCNBPAlias.
  48.     **
  49.     ** This function registers an alias for the application.  This allows PPCBrowser
  50.     ** to be used to display only machines registered with that alias, instead of
  51.     ** all machines that are PPCToolbox capable.  This function is called by 
  52.     ** the application at startup time, as the alias only needs to be registered once.
  53.     ** If there is more than one version of the application running on a single
  54.     ** machine, AddPPCNBPAlias will append a number to the application name.
  55.     ** This allows each copy of the application to be displayed by PPCBrowser.
  56.     **
  57.     ** A sample usage of this function can be found in DTS.StyleChat or Kibitz, in the
  58.     ** file Start.c. */
  59.  
  60. OSErr            RemoveNBPAlias(EntityPtr theEntity);
  61.     /*
  62.     ** INPUT:    theEntity    Pass in the output from AddPPCNBPAlias
  63.     ** RESULT:    OSErr
  64.     **
  65.     ** This function removes the designated alias.  This is executed by the application
  66.     ** at application quit time.  Note that it is very important to remove the NBPAlias,
  67.     ** as it will remain in the queue even after the application has quit.  So don't just
  68.     ** call ExitToShell to exit your application if you are using an NBPAlias.  Remove it
  69.     ** first.  (This presents a problem during development.  If your application crashes,
  70.     ** the application will have quit qithout removing the NBPAlias.  This will cause your
  71.     ** machine to crash shortly.)
  72.     **
  73.     ** A sample usage of this function can be found in DTS.StyleChat or Kibitz, in the
  74.     ** file Start.c. */
  75.  
  76.  
  77. #endif
  78.  
  79.